<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="A fully featured admin theme which can be used to build CRM, CMS, etc.">
        <meta name="author" content="Coderthemes">

        <link rel="shortcut icon" href="__STATIC__/assets/images/favicon.ico">

        <title>宠物后台系统</title>

        <!--Morris Chart CSS -->
        <link rel="stylesheet" href="__STATIC__/assets/plugins/morris/morris.css">

        <!-- App css -->
        <link href="__STATIC__/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
        <link href="__STATIC__/assets/css/icons.css" rel="stylesheet" type="text/css" />
        <link href="__STATIC__/assets/css/style.css" rel="stylesheet" type="text/css" />
        <link href="__STATIC__/layer/layui.css" rel="stylesheet" type="text/css" />
        <script src="__STATIC__/assets/js/modernizr.min.js"></script>

        <link href="__STATIC__/assets/plugins/responsive-table/css/rwd-table.min.css" rel="stylesheet" type="text/css" media="screen">
       

      
        <!-- App css -->
        <link href="__STATIC__assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
        <link href="__STATIC__assets/css/icons.css" rel="stylesheet" type="text/css" />
        <link href="__STATIC__assets/css/style.css" rel="stylesheet" type="text/css" />

        <script src="assets/js/modernizr.min.js"></script>
        <style type="text/css">
            #ttt td{
                font-size: 18px: 
            }

        </style>
        </style>
    </head>


    <body class="fixed-left">

        <!-- Begin page -->
        <div id="wrapper">

            <!-- Top Bar Start -->
            <div class="topbar">

                <!-- LOGO -->
                <div class="topbar-left">
                    <a href="{:url('Index/index')}" class="logo"><span>莫愁<span>商城</span></span><i class="mdi mdi-layers"></i></a>
                </div>

                <!-- Button mobile view to collapse sidebar menu -->
                <div class="navbar navbar-default" role="navigation">
                    <div class="container-fluid">

                        <!-- Page title -->
                        <ul class="nav navbar-nav list-inline navbar-left">
                            <li class="list-inline-item">
                                <button class="button-menu-mobile open-left">
                                    <i class="mdi mdi-menu"></i>
                                </button>
                            </li>
                            <li class="list-inline-item">
                                <h4 class="page-title">待退货/退换订单详情 :</h4>
                            </li>
                        </ul>

                        <nav class="navbar-custom">

                            <ul class="list-unstyled topbar-right-menu float-right mb-0">

                                <li>
                                    <!-- Notification -->
                                    <div class="notification-box">
                                        <ul class="list-inline mb-0">
                                            <li>
                                                <a href="javascript:void(0);" class="right-bar-toggle">
                                                    <i class="mdi mdi-bell-outline noti-icon"></i>
                                                </a>
                                                <div class="noti-dot">
                                                    <span class="dot"></span>
                                                    <span class="pulse"></span>
                                                </div>
                                            </li>
                                        </ul>
                                    </div>
                                    <!-- End Notification bar -->
                                </li>

                                <li class="hide-phone">
                                    <form class="app-search">
                                        <input type="text" placeholder="Search..."
                                               class="form-control">
                                        <button type="submit"><i class="fa fa-search"></i></button>
                                    </form>
                                </li>

                            </ul>
                        </nav>
                    </div><!-- end container -->
                </div><!-- end navbar -->
            </div>
            <!-- Top Bar End -->


            <!-- ========== Left Sidebar Start ========== -->
            {include file="public/left"}
            <!-- Left Sidebar End -->



            <!-- ============================================================== -->
            <!-- Start right Content here -->
            <!-- ============================================================== -->
            <!--- Sidemenu -->
            <div class="content-page">
                <!-- Start content -->
                <div class="content">

                    <div class="container-fluid">
                    {volist name="list" id="v"}
                        <input type="hidden" value="{$v.goods_id}" id="goodsId">
                        <input type="hidden" value="{$v.refund_number}" id="refund">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="card-box">
                                    <!-- <div class="panel-heading">
                                        <h4>Invoice</h4>
                                    </div> -->
                                    <div class="panel-body">
                                        <div class="clearfix">
                                            <div class="pull-left">
                                                <h3 class="logo">退换/货详情</h3><br>
                                                <a href="{:url('Order/quit_order')}" style="color:#fff;"><button type="button" class="btn btn-primary btn-bordred waves-effect w-md waves-light m-b-5">返回上一级</button></a>
                                            </div>
                                            
                                        </div>
                                        <hr>
                                        <div class="row">
                                            <div class="col-md-12">

                                                <div class="pull-left m-t-30">
                                                    <address>
                                                        <strong>商品信息：</strong><br>
                                                        {$v.goods_name}<br>
                                                        {$v.brand_name}<br>
                                                        {$v.selling_name}
                                                    </address>
                                                </div>
                                                <div class="pull-right m-t-30">
                                                    <p><strong>收货人手机： </strong> {$v.user_phone}</p>
                                                    <p class="m-t-10"><strong>收货人: </strong> <span class="label label-pink">{$v.user_name}</span></p>
                                                    <p class="m-t-10"><strong>收货人地址 </strong> {$v.user_address}</p>
                                                </div>
                                            </div><!-- end col -->
                                        </div>
                                        <!-- end row -->

                                        <div class="m-h-50"></div>

                                        <div class="row">
                                            <div class="col-md-12">
                                                <div class="table-responsive">
                                                    <table class="table m-t-30">
                                                        <thead>
                                                        <tr><th>序号</th>
                                                            <th>交易订单号</th>
                                                            <th>支付方式</th>
                                                            <th>支付宝支付金额</th>
                                                            <th>微信支付金额</th>
                                                            <th>余额支付金额</th>
                                                            <th>申请业务</th>
                                                            <th>订单总金额</th>
                                                            <th>商品金额</th>
                                                        </tr></thead>
                                                        <tbody>
                                                        <tr id="ttt">
                                                            <td>{$v.goods_id}</td>
                                                            <td>{$v.merge_number}</td>
                                                            <td>
                                                                {switch name="$v['pay_type']" }
                                                                    {case value="1"}<span style="font-size:18px;" class="badge badge-primary">支付宝</span>{/case}
                                                                    {case value="2"}<span style="font-size:18px;" class="badge badge-success">微信</span>{/case}
                                                                    {case value="3"}<span style="font-size:18px;" class="badge badge-warning">余额</span>{/case}
                                                                    {case value="4"}<span style="font-size:18px;" class="badge badge-primary">支付宝</span> + <span style="font-size:18px;" class="badge badge-warning">余额</span>{/case}
                                                                    
                                                                {/switch}
                                                            </td>
                                                            <td style="color:#188AE2">¥ {$v.ali_unit}</td>
                                                            <td style="color:#10C469;">¥ {$v.wx_unit}</td>
                                                            <td style="color:#F9C851;">¥ {$v.balance_unit}</td>
                                                            <td>
                                                                {if condition="$v['quit_type'] == 1"} 
                                                                    <span style="font-size:18px;" class="badge badge-success">退款</span>
                                                                {else /}
                                                                    <span style="font-size:18px;" class="badge badge-primary">退换</span>
                                                                {/if}
                                                            </td>
                                                            <td>¥ {$v.total}</td>
                                                            <td>¥ {$v.unit}</td>
                                                        </tr>
                                                     
                                                        </tbody>
                                                    </table>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-xl-6 col-6">
                                                <div class="clearfix m-t-40">
                                                    <h5 class="small text-inverse font-600" style="font-size:18px;">退货理由</h5>

                                                    <small>
                                                        {$v.quit_content}
                                                    </small>
                                                </div>
                                            </div>
                                            <div class="col-xl-3 col-6 offset-md-3">
                                                <p class="text-right"><b>原价:</b> {$v.initial_unit}</p>
                                                <p class="text-right">活动价格: {$v.live_unit}</p>
                                                <p class="text-right">补贴额度: {$v.quota} %</p>
                                                <hr>
                                                <h1 class="text-right" style="font-size:20px;"><b >应退金额: </b>&nbsp&nbsp&nbsp&nbsp<b style="color:red;">¥ {$v.refund_unit}</b></h1>
                                            </div>
                                        </div>
                                        <hr>
                                        <div class="d-print-none">
                                            <div class="pull-right">
                                                <!-- <a href="{:url('Order/refund',array('goods_id'=>$v['goods_id']))}" class="btn btn-success waves-effect waves-light">同意</a> -->
                                                <a id="tong" class="btn btn-success waves-effect waves-light">同意</a>
                                                <a href="#" class="btn btn-danger waves-effect waves-light">拒绝</a>
                                            </div>
                                            <div class="clearfix"></div>
                                        </div>
                                    </div>
                                </div>

                            </div>

                        </div>
                    {/volist}
                        <!-- end row -->
                    

                    </div> <!-- container -->

                </div> <!-- content -->

                <footer class="footer text-right">
                    2016 - 2018 © Adminto. Coderthemes.com
                </footer>

            </div>

            <!-- ============================================================== -->
            <!-- End Right content here -->
            <!-- ============================================================== -->


            <!-- Right Sidebar -->
            
            <!-- /Right-bar -->

        </div>
        <!-- END wrapper -->
        <!-- jQuery  -->
      
     

        <!-- responsive-table-->
        <script src="__STATIC__/assets/plugins/responsive-table/js/rwd-table.min.js" type="text/javascript"></script>
        <!-- jQuery  -->
        <script src="__STATIC__/assets/js/jquery.min.js"></script>
        <script src="__STATIC__/assets/js/popper.min.js"></script>
        <script src="__STATIC__/assets/js/bootstrap.min.js"></script>
        <script src="__STATIC__/assets/js/detect.js"></script>
        <script src="__STATIC__/assets/js/fastclick.js"></script>
        <script src="__STATIC__/assets/js/jquery.blockUI.js"></script>
        <script src="__STATIC__/assets/js/waves.js"></script>
        <script src="__STATIC__/assets/js/jquery.nicescroll.js"></script>
        <script src="__STATIC__/assets/js/jquery.slimscroll.js"></script>
        <script src="__STATIC__/assets/js/jquery.scrollTo.min.js"></script>
        <script src="__STATIC__/layer/layer.js"></script>

        <!-- KNOB JS -->
        <!--[if IE]>
        <script type="text/javascript" src="__STATIC__/assets/plugins/jquery-knob/excanvas.js"></script>
        <![endif]-->
        <script src="__STATIC__/assets/plugins/jquery-knob/jquery.knob.js"></script>

        <!--Morris Chart-->
        <script src="__STATIC__/assets/plugins/morris/morris.min.js"></script>
        <script src="__STATIC__/assets/plugins/raphael/raphael-min.js"></script>

        <!-- Dashboard init -->
        <script src="__STATIC__/assets/pages/jquery.dashboard.js"></script>

        <!-- App js -->
        <script src="__STATIC__/assets/js/jquery.core.js"></script>
        <script src="__STATIC__/assets/js/jquery.app.js"></script>
        <script> 
            $("#tong").click(function(){
                var goodsId = $('#goodsId').val();
                var refundnumber = $('#refund').val();
                layer.confirm('确定同意么 ( ・◇・)？', {
                  btn: ['确定','取消'] //按钮
                }, function(){
                     $.ajax({
                         type: "POST",
                         url:"{:url('Order/refund')}",
                         data:{'goods_id':goodsId,'refundnumber':refundnumber},
                         beforeSend:function(){
                                layer.load(0, {shade: false});
                            },
                         success: function(msg) {
                            // console.log(msg);
                            if (msg == 111) {
                                layer.msg('退款成功', {icon: 1});
                                window.location.href = document.referrer;
                            }else{
                                layer.msg('退款失败!');
                            }
                         },
                         complete: function() {
                                 layer.closeAll('loading');
                            }
                    });
                 
                }, function(){
                    layer.msg(' (｡・`ω´･) 再见');
                });
            })
        </script>
    </body>
</html>